package emulator.unittest.hardware.io;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import emulator.hardware.io.Via6522;


public class Via6522Test {
	
	private Via6522 via;

	@Before
	public void setUp()
	{
		via = new Via6522();
	}
	
	@Test
	public void testIER()
	{
		via.writeIER(0x7F);
		assertEquals(0x80, via.readIER());
		via.writeIER(0xFF);
		assertEquals(0xFF, via.readIER());
		via.writeIER(0x3A);
		assertEquals(0xC5, via.readIER());
	}

}
